import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int len=in.nextInt();
        int[] arr=new int[len];
        for(int i=0;i<len;i++){
            arr[i]=in.nextInt();
        }
        Arrays.sort(arr);
        System.out.println(count(arr,len,0,0,1));
    }
    public static int count(int[] arr,int len,int index,int sum,int multi){
        int count=0;
        for(int i=index;i<len;i++) {
            sum = sum + arr[i];
            multi = multi * arr[i];
            if (sum > multi) {
                return count + 1 + count(arr, len, index + 1, sum, multi);
            } else if (arr[i] == 1) {
                return count + count(arr, len, index + 1, sum, multi);
            } else {
                break;
            }
//            sum -= arr[i];
//            multi /= arr[i];
           // while(i+1<len &&arr[i]==arr[i+1]//i++
        }

        return count;
    }
}
